﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DFGK_WMS.Model.Models
{
    /// <summary>
    /// erp下发入库单
    /// </summary>
    [Table("T_MaterialPackageReceiving")]
    public class MaterialPackageReceiving:BaseEntity
    {

        [MaxLength(50)]
        public string BillNo { get; set; }//收货单号
        [MaxLength(50)]
        public string? StoLocation { get; set; }//库存地点
     
        public long SupplierId { get; set; }//供应商编号
        [MaxLength(50)]
        public string SupplierName { get; set; }//供应商名称
        [MaxLength(50)]
        public string BatchNo { get; set; }//批次号

        /// <summary>
        /// 开始时间
        /// </summary>
        public DateTime? BeginDate { get; set; }
        /// <summary>
        /// 完成时间
        /// </summary>
        public DateTime? EndDate { get; set; }

        [MaxLength(50)]
        public string POMode { get; set; }// erp入库类型
        [MaxLength(50)]
        public string OtherTypeCode { get; set; }// 其他出入库类型

        /// <summary>
        /// 质量状态（Y：合格/N：不合格，不合格只能入不良品仓库）
        /// </summary>

        public bool? IsNeedQc { get; set; }

        public int BillType { get; set; }//单据类型
        [MaxLength(50)]
        public string Receiver { get; set; }//收货人

        public long? WarehouseId { get; set; }//库房编号
        [MaxLength(50)]
        public string WarehouseCode {  get; set; }//库房编码

        public long MaterialId { get; set; }//物料编号
        [MaxLength(50)]
        public string MaterialName { get; set; }//物料名称
        [MaxLength(50)]
        public string MaterialCode { get; set; }//物料编码
        public int BatchManager { get; set; }//是否进行批次管理(0:否/1：是)
        [MaxLength(50)]
        public string WorkShopCode { get; set; }//部门编码
        [MaxLength(50)]
        public string WorkShopName { get; set; }//部门编码

        [Column(TypeName = "decimal(18,4)")]
        public decimal? AllQty {  get; set; }//数量
        public int PakcRevevingStatus { get; set; } = 0;//状态 0 未开始 1 未完成 2 完成
    }
}
